package com.mdxq.feign.client;


import com.mdxq.feign.config.DefaultFeignConfiguration;
import com.mdxq.feign.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author WanJl
 * @version 1.0
 * @title UserClient
 * @description
 * @create 2025/2/7
 */
//设置我们自定义的Feign配置类针对user-service服务单独生效
//@FeignClient(value = "user-service",
//        configuration = DefaultFeignConfiguration.class)
@FeignClient("user-service")
public interface UserClient {
    @GetMapping("/user/{id}")
    User findById(@PathVariable Long id);
}
